home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
X User Tools
/
X User Tools (O'Reilly and Associates)(1994).ISO
/
sun4c
/
archive
/
tcltk.z
/
tcltk
/
man
/
catn
/
while.n
< prev
next >
Wrap
Text File
|
1994-09-20
|
1KB
|
67 lines
while(n) Tcl Built-In Commands
_________________________________________________________________
NAME
while - Execute script repeatedly as long as a condition is
met
SYNOPSIS
while _t_e_s_t _b_o_d_y
_________________________________________________________________
DESCRIPTION
The _w_h_i_l_e command evaluates _t_e_s_t as an expression (in the
same way that expr evaluates its argument). The value of
the expression must a proper boolean value; if it is a true
value then _b_o_d_y is executed by passing it to the Tcl inter-
preter. Once _b_o_d_y has been executed then _t_e_s_t is evaluated
again, and the process repeats until eventually _t_e_s_t evalu-
ates to a false boolean value. Continue commands may be
executed inside _b_o_d_y to terminate the current iteration of
the loop, and break commands may be executed inside _b_o_d_y to
cause immediate termination of the while command. The while
command always returns an empty string.
KEYWORDS
boolean value, loop, test, while
Tcl 1